﻿using System.Data.Entity.ModelConfiguration;
using Domain.MainModule.Entities;

namespace Infrastructure.Data.MainModule.MainModule.Mapping
{
    /// <summary>
    /// The country entity type configuration
    /// </summary>
    class RSVPsEntityConfiguration:EntityTypeConfiguration<RSVPs>
    {
        /// <summary>
        /// Create a new instance of Country entity type configuration
        /// </summary>
        public RSVPsEntityConfiguration()
        {
            //configure key and properties
            this.HasKey(p => p.RsvpID);
            this.HasRequired(p => p.Dinners).WithMany(p => p.RSVPs);
            //configure table map
            this.ToTable("RSVPs");
        }
    }
}
